package com.cleaner.base.utils

import android.telephony.TelephonyManager
import androidx.appcompat.app.AppCompatActivity
import com.cleaner.base.appContext

object Country {
    fun isInCountry(vararg country: String): Boolean {
        val telephonyManager = appContext.getSystemService(AppCompatActivity.TELEPHONY_SERVICE) as TelephonyManager
        val countryIso = telephonyManager.networkCountryIso
        if (countryIso.isNullOrEmpty()) return false
        for (item in country) {
            if (countryIso.contentEquals(item)) return true
        }
        return false
    }
}